package com.ruoyi.womp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.womp.mapper.WompWeighingApparatusElementMapper;
import com.ruoyi.womp.domain.WompWeighingApparatusElement;
import com.ruoyi.womp.service.IWompWeighingApparatusElementService;
import com.ruoyi.common.core.text.Convert;

/**
 * 衡器要素列表Service业务层处理
 * 
 * @author mzz
 * @date 2022-04-11
 */
@Service
public class WompWeighingApparatusElementServiceImpl implements IWompWeighingApparatusElementService 
{
    @Autowired
    private WompWeighingApparatusElementMapper wompWeighingApparatusElementMapper;

    /**
     * 查询衡器要素列表
     * 
     * @param id 衡器要素列表主键
     * @return 衡器要素列表
     */
    @Override
    public WompWeighingApparatusElement selectWompWeighingApparatusElementById(Integer id)
    {
        return wompWeighingApparatusElementMapper.selectWompWeighingApparatusElementById(id);
    }

    /**
     * 查询衡器要素列表列表
     * 
     * @param wompWeighingApparatusElement 衡器要素列表
     * @return 衡器要素列表
     */
    @Override
    public List<WompWeighingApparatusElement> selectWompWeighingApparatusElementList(WompWeighingApparatusElement wompWeighingApparatusElement)
    {
        return wompWeighingApparatusElementMapper.selectWompWeighingApparatusElementList(wompWeighingApparatusElement);
    }

    /**
     * 新增衡器要素列表
     * 
     * @param wompWeighingApparatusElement 衡器要素列表
     * @return 结果
     */
    @Override
    public int insertWompWeighingApparatusElement(WompWeighingApparatusElement wompWeighingApparatusElement)
    {
        wompWeighingApparatusElement.setCreateTime(DateUtils.getNowDate());
        return wompWeighingApparatusElementMapper.insertWompWeighingApparatusElement(wompWeighingApparatusElement);
    }

    /**
     * 修改衡器要素列表
     * 
     * @param wompWeighingApparatusElement 衡器要素列表
     * @return 结果
     */
    @Override
    public int updateWompWeighingApparatusElement(WompWeighingApparatusElement wompWeighingApparatusElement)
    {
        wompWeighingApparatusElement.setUpdateTime(DateUtils.getNowDate());
        return wompWeighingApparatusElementMapper.updateWompWeighingApparatusElement(wompWeighingApparatusElement);
    }

    /**
     * 批量删除衡器要素列表
     * 
     * @param ids 需要删除的衡器要素列表主键
     * @return 结果
     */
    @Override
    public int deleteWompWeighingApparatusElementByIds(String ids)
    {
        return wompWeighingApparatusElementMapper.deleteWompWeighingApparatusElementByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除衡器要素列表信息
     * 
     * @param id 衡器要素列表主键
     * @return 结果
     */
    @Override
    public int deleteWompWeighingApparatusElementById(Integer id)
    {
        return wompWeighingApparatusElementMapper.deleteWompWeighingApparatusElementById(id);
    }
}
